﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 战棋模拟器
{
    class 老瞎眼:Minion
    {
        public 老瞎眼():base()
        {
            buff = 1;
            Star = 2;
            Attack = 2;
            Health = 4;
            Race = race.murloc;
            //你猜我写不写冲锋
        }

        public override void Initialize()
        {
            foreach(Minion m in pool.places)
            {
                if (m == null)
                    break;
                if (m != this)
                    if (m.Race == race.murloc||m.Race == race.all)
                        Attack+=buff;
            }
            foreach(Minion m in pool.next.places)
            {
                if (m == null)
                    break;
                if ((m.Race == race.murloc || m.Race == race.all))
                    Attack+=buff;
            }
            base.Initialize();
        }


        public override void OnSpawn(Minion m)
        {
            if ((m.Race == race.murloc || m.Race == race.all)&&m!=this)
                Attack+=buff;
        }


        public override void OnEnemySpawn(Minion m)
        {
            if ((m.Race == race.murloc || m.Race == race.all))
                Attack += buff;
        }


        public override void OnDie(Minion m)
        {
            if ((m.Race == race.murloc || m.Race == race.all))
                Attack-=buff;
        }


        public override void OnEnemyDie(Minion m)
        {
            if ((m.Race == race.murloc || m.Race == race.all))
                Attack -= buff;
        }


        public override Minion NewOne()
        {
            return new 老瞎眼();
        }
    }


    class 老瞎眼_金色 : 老瞎眼
    {
        public 老瞎眼_金色() : base()
        {
            Attack *= 2;
            Health *= 2;
            count *= 2;
            buff *= 2;
        }

        public override Minion NewOne()
        {
            return new 老瞎眼_金色();
        }
    }
}
